-
Notifications
You must be signed in to change notification settings - Fork 127
fix: replace XWayland backend with Wayland in Wayland sessions #414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hi, please refactor due to 98af104 Thanks! |
|
can we get this to prod? |
|
#460 was merged, which makes this stuff a bit cleaner, maybe we can add WAYLAND_DISPLAY to |
fbede1a to
13ab375
Compare
Sorry for my late reply. However, we can add |
13ab375 to
38c8a33
Compare
|
Can you try this out? I'd rather keep it all here. This works ok for me in Mint 22. I get a native Wayland window. Update your PR if you want and I'll merge it. diff --git a/src/Core/Main.vala b/src/Core/Main.vala
index bf7a629..5954af8 100644
--- a/src/Core/Main.vala
+++ b/src/Core/Main.vala
@@ -378,13 +378,22 @@ public class Main : GLib.Object{
}
// copy all required enviroment vars from the user to this process
- string[] targets = {"DISPLAY", "XAUTHORITY", "DBUS_SESSION_BUS_ADDRESS"};
+ string[] targets = {"GTK_THEME", "DISPLAY", "XAUTHORITY", "DBUS_SESSION_BUS_ADDRESS"};
foreach (string target in targets) {
string user_var = TeeJee.ProcessHelper.get_env(user_env, target);
if(user_var != null) {
GLib.Environment.set_variable(target, user_var, true);
}
}
+
+ string xdg_runtime_dir = TeeJee.ProcessHelper.get_env(user_env, "XDG_RUNTIME_DIR");
+ string wayland_display = TeeJee.ProcessHelper.get_env(user_env, "WAYLAND_DISPLAY");
+
+ if (wayland_display != null && xdg_runtime_dir != null) {
+ string path = "%s/%s".printf(xdg_runtime_dir, wayland_display);
+ GLib.Environment.set_variable("WAYLAND_DISPLAY", path, true);
+ GLib.Environment.set_variable("XDG_RUNTIME_DIR", "/run/user/0", true);
+ }
}
private int[]? get_btrfs_version_array () { |
|
@mtwebster A native Wayland window is displayed after reverting my previous changes and applying your patch. However, the following log appears in the terminal: IMO we should remove the usage of |
38c8a33 to
2b0af98
Compare
Replace XWayland with Wayland in Wayland sessions. Thanks to @mtwebster for the patch. Closes: #387
2b0af98 to
74ee265
Compare
|
@mtwebster I have just pushed a new commit that includes your patch and removes the usage of |
Replace XWayland with Wayland in Wayland sessions.
Thanks to @mtwebster for the patch.
Closes: #387